﻿@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/BaseView.cshtml";
}
@{
    Common.Web.Cookie cookie = new Common.Web.Cookie();
    int visiterId = Convert.ToInt32(cookie.GetCookie("LoginUserId"));
    BenefitHelper.DB.DBManager db = new BenefitHelper.DB.DBManager();
    if (BenefitHelper.Sys.VisitPrower.HasAdminPrower(visiterId, db))
    { 
    <div id="buttons">
        <span>
            <p>
                <a href="/Init" target="_blank" title="后台管理">后台管理</a>
            </p>
        </span>
    </div>
    }
    db.Dispose();
}
<dl id="xiangmu">
    <dt><span id="title2">@ViewBag.op.UName</span></dt>
    <dd>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="panzhongfenxi">
            <tr>
                <td id="curr_p">
                    <b class="panzhong"><a>盘中分析</a></b><b><a href="/AfterAnalysis/Index/@ViewBag.op.Id/@ViewBag.pdate">盘后分析</a></b>
                </td>
                <td>
                    <a href="/OperatorRealtimeTransaction/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_01.gif" />汇总信息</a>
                </td>
                <td>
                    <a href="/TimeSharing/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_09.gif" />持仓分析</a>
                </td>
                <td class="selected">
                    <img src="/Content/images/icon_10.gif" />盈亏分布
                </td>
                <td>
                    <a href="/TradeDetail/Index/@ViewBag.op.Id/@ViewBag.pdate">
                        <img src="/Content/images/icon_05.gif" />交易明细</a>
                </td>
            </tr>
        </table>
    </dd>
</dl>
<div id="bigDataBox">
    <span style="width: 50%;">数据统计时间：
        <input type="text" id="key" class="Wdate" onclick="WdatePicker()" name="key"  value="@ViewBag.Hpdate" /><span
            style="padding-left: 24px;"><span style="cursor: pointer;"><input type="button" value="查看"
                style="font-size: 9pt; width: 60px; height: 22px;" id="changedate" /></span></span></span>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
        <img src="/content/images/yingkuifenxi.png" />
    </div>
    <table style="width: 100%; height: 170px;">
        <tr>
            <td style="width: 56%; vertical-align: top;">
                <div class="statisticsTime" style="height: 154px;">
                    <div style="width: 100%; height: 154px;" id="showflash3">
                    </div>
                </div>
            </td>
            <td style="width: 44%; vertical-align: top;">
                <table style="width: 100%;" class="list" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="title">
                            指数
                        </td>
                        <td class="title">
                            值
                        </td>
                        <td class="title">
                            月累计
                        </td>
                    </tr>
                    <tr>
                        <td>
                            盈利
                        </td>
                        <td>
                            @string.Format("{0:N2}", ViewBag.ochange.SumWin)
                        </td>
                        <td class="leftyes">
                            @string.Format("{0:N2}", ViewBag.osum.SumWin)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            亏损
                        </td>
                        <td>
                            @string.Format("{0:N2}", ViewBag.ochange.SumLost)
                        </td>
                        <td class="leftyes">
                            @string.Format("{0:N2}", ViewBag.osum.SumLost)
                        </td>
                    </tr>
                    <tr>
                        <td>
                            净盈利
                        </td>
                        <td>
                            @string.Format("{0:N2}", ViewBag.ochange.DayCount)
                        </td>
                        <td class="leftyes">
                            @string.Format("{0:N2}", ViewBag.osum.DayCount)
                        </td>
                    </tr>
                    <tr>
                        <td class="bottomyes">
                            盈亏比
                        </td>
                        <td class="bottomyes">
                            @Math.Round(ViewBag.ochange.SumWin / ViewBag.ochange.SumLost, 2)
                        </td>
                        <td class="leftyes bottomyes">
                            @Math.Round(ViewBag.osum.SumWin / ViewBag.osum.SumLost, 2)
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div style="height: 30px; line-height: 30px;">
    </div>
    <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
        <img src="/content/images/yingkuifenxi.png" />
    </div>
    <div id="DateSelectBar" class="date-select-bar" style="float: right;">
        <a class='cur' style="cursor: pointer;" onclick="changediv(1,this)">按时间</a> <a onclick="changediv(2,this)"
            style="cursor: pointer;">按品种</a> <a onclick="changediv(3,this)" style="cursor: pointer;">
                按多空</a><a onclick="changediv(4,this)" style="cursor: pointer;">按收益情况</a>
    </div>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <table style="width: 100%; height: 300px; table-layout: fixed;">
        <tr>
            <td style="width: 56%; vertical-align: top;">
                <div class="statisticsTime" style="height: 319px;">
                    <div style="width: 100%; height: 340px;" id="showflash">
                    </div>
                </div>
            </td>
            <td style="width: 44%; vertical-align: top;">
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; width: 326px;"
                    id="timediv">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            时间
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            9:00-9:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[0].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[0].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[0].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            9:30-10:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[1].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[1].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[1].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            10:00-10:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[2].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[2].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[2].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            10:30-11:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[3].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[3].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[3].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            13:00-13:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[4].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[4].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[4].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            13:30-14:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[5].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[5].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[5].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            14:00-14:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[6].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[6].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[6].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            14:30-15:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.LostTimePie.Datas[7].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.LostTimePie.Datas[7].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.LostTimePie.Datas[7].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.LostSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.LostSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; width: 326px;
                    display: none;" id="productdiv">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            品种
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayProductInfo info in ViewBag.LostWinInfos)
                    { 
                        <tr>
                            <td style="text-align: left; padding-left: 10px;">
                                @info.ProductId
                            </td>
                            <td style="text-align: right;">
                                @info.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", info.Profit)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @info.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        int repeatCount = 0;
                        if (ViewBag.LostWinInfos.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.LostWinInfos.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.LostWinSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.LostWinSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; width: 326px;
                    display: none;" id="headdiv">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            多头/空头
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayDirectionInfoData a in ViewBag.LostDirection.Datas)
                    {
                        <tr>
                            <td style="text-align: left; padding-left: 10px;">
                                @a.Direction
                            </td>
                            <td style="text-align: right;">
                                @a.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", a.SumValue)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @a.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        repeatCount = 0;
                        if (ViewBag.LostDirection.Datas.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.LostDirection.Datas.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.LostDirectionSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.LostDirectionSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; width: 326px;
                    display: none;" id="moneydiv">
                    <tr style="width: 100%;">
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            金额
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayWinNumData i in ViewBag.LostNum.Datas)
                    {
                        <tr>
                            <td>
                                @i.Level 以下
                            </td>
                            <td style="text-align: right;">
                                @i.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", i.SumValue)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @i.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        repeatCount = 0;
                        if (ViewBag.LostNum.Datas.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.LostNum.Datas.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.LostNumSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.LostNumSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <table style="width: 100%; height: 300px;">
        <tr>
            <td style="width: 56%; vertical-align: top;">
                <div class="statisticsTime" style="height: 319px;">
                    <div style="width: 100%; height: 340px;" id="showflash2">
                    </div>
                </div>
            </td>
            <td style="width: 44%; vertical-align: top;">
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;" id="timediv2">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            时间
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            盈利金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            9:00-9:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[0].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[0].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[0].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            9:30-10:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[1].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[1].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[1].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            10:00-10:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[2].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[2].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[2].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            10:30-11:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[3].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[3].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[3].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            13:00-13:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[4].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[4].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[4].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            13:30-14:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[5].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[5].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[5].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            14:00-14:30
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[6].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[6].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[6].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;">
                            14:30-15:00
                        </td>
                        <td style="text-align: right;">
                            @ViewBag.WinTimePie.Datas[7].BillCount
                        </td>
                        <td style="text-align: right;">
                            @string.Format("{0:N2}", ViewBag.WinTimePie.Datas[7].SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes">
                            @ViewBag.WinTimePie.Datas[7].Percent %
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.WinSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.WinSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; display: none;"
                    id="productdiv2">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            品种
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            盈利金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayProductInfo a in ViewBag.WinProductInfos)
                    {
                        <tr>
                            <td style="text-align: left; padding-left: 10px;">
                                @a.ProductId
                            </td>
                            <td style="text-align: right;">
                                @a.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", a.Profit)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @a.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        repeatCount = 0;
                        if (ViewBag.WinProductInfos.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.WinProductInfos.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.WinWinSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.WinWinSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; display: none;"
                    id="headdiv2">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            多头/空头
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayDirectionInfoData a in ViewBag.WinDirection.Datas)
                    {
                        <tr>
                            <td style="text-align: left; padding-left: 10px;">
                                @a.Direction
                            </td>
                            <td style="text-align: right;">
                                @a.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", a.SumValue)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @a.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        repeatCount = 0;
                        if (ViewBag.WinDirection.Datas.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.WinDirection.Datas.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.WinDirectionSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.WinDirectionSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" class="list" style="width: 100%; display: none;"
                    id="moneydiv2">
                    <tr>
                        <td class="title" style="text-align: left; padding-left: 10px;">
                            金额
                        </td>
                        <td class="title" style="text-align: right;">
                            笔数
                        </td>
                        <td class="title" style="text-align: right;">
                            亏损金额
                        </td>
                        <td class="title" style="text-align: right;">
                            占比
                        </td>
                    </tr>
                    @foreach (BenefitHelper.View.OperatorDayWinNumData i in ViewBag.WinNum.Datas)
                    {
                        <tr>
                            <td>
                                @i.Level 以下
                            </td>
                            <td style="text-align: right;">
                                @i.BillCount
                            </td>
                            <td style="text-align: right;">
                                @string.Format("{0:N2}", i.SumValue)
                            </td>
                            <td style="text-align: right;" class="leftyes">
                                @i.Percent %
                            </td>
                        </tr>
                    }
                    @{
                        repeatCount = 0;
                        if (ViewBag.WinNum.Datas.Count < 8)
                        {
                            repeatCount = 8 - ViewBag.WinNum.Datas.Count;
                        }
                        for (int i = 0; i < repeatCount; i++)
                        {
                        <tr>
                            <td colspan="4" class="leftyes">
                                &nbsp;
                            </td>
                        </tr>
                        }
                    }
                    <tr>
                        <td style="text-align: left; padding-left: 10px;" class="bottomyes">
                            合计
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @ViewBag.WinNumSumData.BillCount
                        </td>
                        <td style="text-align: right;" class="bottomyes">
                            @string.Format("{0:N2}", ViewBag.WinNumSumData.SumValue)
                        </td>
                        <td style="text-align: right;" class="leftyes bottomyes">
                            -
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div class="report-tip">
        <div class="report-tip-text">
            <div>
                <b>功能说明：</b></div>
            <div>
                亏损性成交：相对于当前（统计时间显示的时间）股票价格，在所有当日已经的成交中对于买入用户处于亏损的成交分布。<br />
                获利性成交：相对于当前（统计时间显示的时间）股票价格，在所有当日已经的成交中对于买入用户处于获利的成交分布。<br />
                成交均价：所有处于亏损或获利的不同成交单子中进行统计，平均成交价格。</div>
        </div>
        <div class="report-tip-close">
            &nbsp;</div>
        <div class="report-tip-text">
            <div>
                <b>使用帮助：</b></div>
            <div>
                本内容主要是将大小单成交与获利与亏损结合起来，以便于用户可以通过分析来获取有利于交易的市场交易习惯和潜在交易机会。</div>
        </div>
        <div class="report-tip-text">
            <div>
                <b>数据更新：</b></div>
            <div>
                盘中数据动态更新，更新间隔5分钟，由于运算因素，实时成交数据整体延时约5-10分钟。</div>
        </div>
    </div>
</div>
@MvcHtmlString.Create(ViewBag.js)
<script type="text/javascript">
    BenefitTimePie();
    WinAndLose();
    BenefitTimePie2();
    function changediv(id, obj) {
        $("#productdiv").css("display", "none");
        $("#moneydiv").css("display", "none");
        $("#headdiv").css("display", "none");
        $("#timediv").css("display", "none");
        $("#productdiv2").css("display", "none");
        $("#moneydiv2").css("display", "none");
        $("#headdiv2").css("display", "none");
        $("#timediv2").css("display", "none");


        $(".cur").removeClass();
        $(obj).addClass("cur");
        if (id == 1) {
            $("#timediv").css("display", "");
            $("#timediv2").css("display", "");
            //  BenefitTimePie();
            //   BenefitTimePie2();
        } else if (id == 2) {
            $("#productdiv").css("display", "");
            $("#productdiv2").css("display", "");
            //   BenefitProductPie();
            //   BenefitProductPie2();
        } else if (id == 3) {
            $("#headdiv").css("display", "");
            $("#headdiv2").css("display", "");
            //   BenefitHeadPie();
            //   BenefitHeadPie2();
        } else if (id == 4) {
            $("#moneydiv").css("display", "");
            $("#moneydiv2").css("display", "");
            //   BenefitMoneyPie();
            //    BenefitMoneyPie2();
        }
    }
</script>
